import React from 'react'
import Item from './Item'

class Body extends React.Component {
  render() {
    const { todos, checkTodoItem, deleteTodoItem } = this.props

    return (
      <ul className="list-group">
        {todos.map(item => {
          return <Item key={item.id} {...item} checkTodoItem={checkTodoItem} deleteTodoItem={deleteTodoItem} />
        })}
      </ul>
    )
  }
}

export default Body
